package org.rsbot.loader.script.adapter;

import org.rsbot.loader.asm.ClassAdapter;
import org.rsbot.loader.asm.ClassVisitor;

public class AddFieldAdapter extends ClassAdapter
{
  private Field[] fields;

  public AddFieldAdapter(ClassVisitor paramClassVisitor, Field[] paramArrayOfField)
  {
    super(paramClassVisitor);
    this.fields = paramArrayOfField;
  }

  public void visitEnd() {
    for (Field localField : this.fields) {
      this.cv.visitField(localField.access, localField.name, localField.desc, null, null);
    }
    this.cv.visitEnd();
  }

  public static class Field
  {
    public int access;
    public String name;
    public String desc;
  }
}